
class common():
    #定位
    def __init__(self,driver):
        self.driver = driver

    def getSize(self):
        x = self.driver.get_window_size()['width']
        y = self.driver.get_window_size()['height']
        return (x, y)

    def location(self,m,n):
        self.list1 = self.getSize()
        self.X1 = (m/1920)*self.list1[0]
        self.Y1 = (n/1104)*self.list1[1]
        self.driver.tap([(self.X1, self.Y1)], 500)


